﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ItemButton, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Button, "ScriptType"))

	_DB:AddCodeHelp("OnItemChanged", [[ScriptType, Run when the Item is changed]], [[OnItemChanged()]])
	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ItemButton, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Button, "Function"))

	_DB:AddCodeHelp("SetItemCount", [=[Sets the item count that diplayed on the item button]=], [=[SetItemCount(num)]=])
	_DB:AddCodeHelp("SetItem", [=[Sets an item link to the item button]=], [=[SetItem(itemLink)]=])
	_DB:AddCodeHelp("AddListItem", [=[Add an item to the button's item list]=], [=[AddListItem(itemLink)]=])
	_DB:AddCodeHelp("SetItemTextureVertexColor", [=[Sets a color shading for the Item's graphics. The effect of changing this property differs by the type of region]=], [=[SetItemTextureVertexColor(red, green, blue, [alpha])]=])
	_DB:AddCodeHelp("SetItemDesaturated", [=[Sets whether the texture image should be displayed with zero saturation (i.e. converted to grayscale).]=], [=[SetItemDesaturated(flag, [red, green, blue])]=])
	_DB:AddCodeHelp("ClearList", [=[Clear the button's item list]=], [=[ClearList()]=])
	_DB:AddCodeHelp("SetItemNormalTextureVertexColor", [=[Sets a color shading for the itembutton's graphics. The effect of changing this property differs by the type of region]=], [=[SetItemNormalTextureVertexColor(red, green, blue, [alpha])]=])
	_DB:AddCodeHelp("SetItemName", [=[Sets an item name to the item button]=], [=[SetItemName(itemName)]=])
	_DB:AddCodeHelp("RemoveList", [=[Remove the button's item list and dipose the item list]=], [=[RemoveList()]=])
	_DB:AddCodeHelp("SetItemTexture", [=[Sets the item texture]=], [=[SetItemTexture(texture)]=])
	_DB:AddCodeHelp("RemoveListItem", [=[Remove an item from the button's item list]=], [=[RemoveListItem(itemLink)]=])
	_DB:AddCodeHelp("RefreshList", [=[Refresh the button's item list]=], [=[RefreshList([filterfunc])]=])
	_DB:AddCodeHelp("GetItem", [=[Returns the name and hyperlink for the item displayed in the tooltip]=], [=[GetItem()]=])
	_DB:AddCodeHelp("SetItemStock", [=[Sets the item stock that diplayed on the item button(show in the bottomleft corner)]=], [=[SetItemStock(num)]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ItemButton, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Button, "Property"))

	_DB:AddCodeHelp("ItemCount", [[Set the item's count]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("ListDirection", [[the item list's direction]], IGAS:GetPropertyType("ItemListDirection"))
	_DB:AddCodeHelp("ListShowNilButton", [[Whether show the nil button in item list]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("ItemName", [[the item's name]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("BankItemIncluded", [[Whether count an item include the bank items]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("ItemStock", [[the stock of the item]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Item", [[the item link]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("ItemTexture", [[the item's texture]], IGAS:GetPropertyType("Texture"))
	_DB:AddCodeHelp("ShowItemName", [[Whether show the item's name or not]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("ShowItemCount", [[Whether show item count or not]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("ListUnit", [[the item list's unit]], IGAS:GetPropertyType("string"))
end
